This page documents how to use Lua-based lexers from Scintillua. SciTECO does not have Scintillua compiled in, but it supports loading external lexer libraries. You can download and extract Scintillua releases, which contain precompiled Windows and Linux 64-bit shared libraries. If there are no precompiled libraries, you can of course manually build Scintillua.
The following macro file for instance, when placed into $SCITECOPATH/lexers/apl.tes
, adds APL syntax highlighting
via Scintillua:
!* APL (via Scintillua) *!
@^U[lexer.test.apl]{
:@EN/*.apl/^EQ*/
}
@^U[lexer.set.apl]{
@ES/SETILEXER/^EQ[$SCITECO_SCINTILLUA]^@apl/$
:M[color.keyword],(@ES/NAMEOFSTYLE/keyword/)M[color.set]
:M[color.number],(@ES/NAMEOFSTYLE/number/)M[color.set]
:M[color.string],(@ES/NAMEOFSTYLE/string/)M[color.set]
:M[color.operator],(@ES/NAMEOFSTYLE/type/)M[color.set]
:M[color.variable],(@ES/NAMEOFSTYLE/variable/)M[color.set]
:M[color.comment],(@ES/NAMEOFSTYLE/comment/)M[color.set]
:M[color.preproc],(@ES/NAMEOFSTYLE/preprocessor/)M[color.set]
}
You must set the SCITECO_SCINTILLUA
environment variable to point to the libscintillua.so shared library (or DLL).
The SCITECO_SCINTILLUA_LEXERS
environment variable should point to the location of Scintillua’s lexers/
subdirectory.
For instance:
export SCITECO_SCINTILLUA_LEXERS=$HOME/scintillua_6.3/lexers
export SCITECO_SCINTILLUA=$SCITECO_SCINTILLUA_LEXERS/libscintillua.so
SCI_NAMEOFSTYLE
had to be tweaked.
Instead, it would be better to have a variant of ES
that allows returning strings into Q-Registers,
so the lexer scripts can build a style-id-to-name map.SCI_SETPROPERTIES
- we need to be able to pass two strings to Scintilla messages.SCI_NAMEOFSTYLE
workaround above.SCI_SETILEXER
when setting the scintillua.lexers property. You then wouldn’t necessarily have to set the SCITECO_SCINTILLUA_LEXERS
environment variable.14B Sep 28 21:20 ../